﻿using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using KinectCurve.Entities;

namespace KinectCurve.ViewModel
{
    public partial class MenuViewModel
    {
        private RelayCommand _newGameClickCommand;
        public RelayCommand NewGameClickCommand
        {
            get
            {
                return _newGameClickCommand ?? (_newGameClickCommand = new RelayCommand(() =>
                {
                    ViewModelLocator.MainStatic.StartTimer();
                    Messenger.Default.Send<EnumMenu>(EnumMenu.Game, "menuCommand");
                }));
            }
        }

        private RelayCommand _optionsClickCommand;
        public RelayCommand OptionsClickCommand
        {
            get
            {
                return _optionsClickCommand ?? (_optionsClickCommand = new RelayCommand(() =>
                {
                    ViewModelLocator.MainStatic.StopTimer();
                    Messenger.Default.Send<EnumMenu>(EnumMenu.Options, "menuCommand");
                }));
            }
        }

        private RelayCommand _exitClickCommand;
        public RelayCommand ExitClickCommand
        {
            get
            {
                return _exitClickCommand ?? (_exitClickCommand = new RelayCommand(() =>
                {
                    ViewModelLocator.MainStatic.StopTimer();
                    Messenger.Default.Send<EnumMenu>(EnumMenu.Exit, "menuCommand");
                }));
            }
        }

    }
}
